/*
 * @Author: 贾博林 11457230+jabolin@user.noreply.gitee.com
 * @Date: 2022-10-24 15:50:06
 * @LastEditors: 贾博林 11457230+jabolin@user.noreply.gitee.com
 * @LastEditTime: 2022-10-24 21:17:00
 * @FilePath: \v-shop\code\src\http\goods\api.js
 * @Description: goods.api
 */
import request from '../request'

// goods渲染数据
export function goods(data) {
    return request({
        url: "goods",
        method: "get",
        params:data
    })
}

// goods添加商品
export function goods_tj(data) {
    return request({
        url: "goods",
        method: "post",
        data
    })
}

// goods删除商品
export function goods_sc(data) {
    return request({
        url: `goods/${data.goods_id}`,
        method: "delete",
        data
    })
}

// goods修改商品
export function goods_xg(data) {
    return request({
        url: "goods/:id",
        method: "put",
        data
    })
}
